|
|
Tom Melly wrote:
>
> "Tor Olav Kristensen" <tor### [at] hotmailcom> wrote in message
> news:3BBCFCD2.6558A619@hotmail.com...
>
> <snip>
>
> Nice - but like my perl solution and bob's windows solution, it doesn't deal
> with fractions (I know, I know, I never mentioned that - sorry).
>
> Actually I got mine to deal with simple fractions, such as 0.5 and 0.25 etc. and
> I THINK I now know how to deal with more fiddly ones. I think I keep doubling it
> until the fractional part is either negligble in comparison to the integer part,
> or until it disappears...
That sounds like a working strategy.
But maybe this page does what you need ?
http://babbage.cs.qc.edu/courses/cs341/IEEE-754.html
"IEEE-754 Floating-Point Conversion
From Decimal Floating-Point
To 32-bit and 64-bit Hexadecimal Representations
Along with Their Binary Equivalents"
Tor Olav
Post a reply to this message
|
|